package example.my_practice;

import example.entity.User;

import java.util.HashSet;
import java.util.Set;

/**
 * @author guoQ.z
 * @date 2021/1/15 16:56
 * TODO
 */
public class SetRepeat {

    public static void main(String[] args) {
        User u1 = new User();
        u1.setName("12");
        u1.setId("12");

        User u2 = new User();
        u2.setName("12");
        u2.setId("12");

        Set<User> set = new HashSet<>();
        set.add(u1);
        set.add(u2);

        System.out.println(set);
        // ? set 里面会有几个对象

    }
}
